function Circle(x, y, r)
{
  this.x = x;
  this.y = y;
  this.r = r;
}

function Log(priority)
{
  this.priority = priority;
}

Log.prototype.write =
  function (c)
  {
    if (this.priority > 3)
    {
      print("X", c.x, "Y", c.y, "R", c.r);
    }
  }

var log = new Log(5);
var c1 = new Circle(10, 30, 40);
var c2 = new Circle(20, 20, 20);
log.write(c1);
log.write(c2);